import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:get/get.dart';

import '../../base/imageres.dart';
import '../../base/stringres.dart';
import '../../base/theme.dart';
import '../../views/jsw_base_view.dart';

///女性健康下面的图表说明
class ChartExplainPage extends StatefulWidget {
  const ChartExplainPage({super.key});

  @override
  State<StatefulWidget> createState() {
    return _ChartExplainPageState();
  }
}

class _ChartExplainPageState extends State<ChartExplainPage> {
  static const _tag = '[page_chart_explain.dart][_ChartExplainPageState]';

  @override
  void initState() {
    super.initState();
    SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual,
        overlays: SystemUiOverlay.values);
  }

  @override
  Widget build(BuildContext context) {
    return Stack(
      children: [
        Container(
          decoration: const BoxDecoration(
            image: DecorationImage(
              image: AssetImage(ImageRes.bg_health_set),
              fit: BoxFit.cover, // 图片填充方式
            ),
          ),
        ),
        Scaffold(
          backgroundColor: Colors.transparent, // 设置 Scaffold 背景透明
          appBar: AppBar(
            elevation: 0.0,
            backgroundColor: Colors.transparent,
            title: EasyTouch(
              width: double.infinity,
              padding: const EdgeInsets.only(right: 55),
              child: Text(
                StringRes.chart_explain,
                textAlign: TextAlign.center,
                style: ThemeUtil.toolbar,
              ),
            ),
            leading: IconButton(
              splashColor: Colors.transparent,
              highlightColor: Colors.transparent,
              hoverColor: Colors.transparent,
              icon: const Icon(
                Icons.arrow_back,
                color: Colors.white,
              ),
              onPressed: () {
                Get.back();
              },
            ),
          ),
          body: Container(margin: const EdgeInsets.only(top: 32, left: 20, right: 20, bottom: 50),
              child: Text(
                StringRes.chart_explain_content,
                textAlign: TextAlign.left,
                style: ThemeUtil.p2.copyWith(
                    fontSize: 14,
                    color: const Color(ThemeUtil.primaryWhiteValue50)),
              )),
        ),
      ],
    );
  }
}
